﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using System.IO;

namespace UstavCSharpServer
{
    public partial class MainForm : Form
    {
        UstavServer server = new UstavServer();

        public MainForm()
        {
            InitializeComponent();
            server.Start(Convert.ToInt16(textBoxPort.Text));
        }

        private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            server.Stop();
        }
      
    }
}
